package com.stulab.sofarpc;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.alipay.sofa.runtime.api.annotation.SofaReferenceBinding;
import com.stulab.sofarpc.api.CalService;

@RestController
public class CalResource {
	
	@SofaReference(interfaceType = CalService.class, binding = @SofaReferenceBinding(bindingType = "bolt"))
	CalService calService;

	
	@RequestMapping("/cal")
	public Double cal() {
//		return calService.calString(1);
		return calService.cal(1D,2D);
	}
	
}
